﻿using System;

namespace MessagePack.Formatters
{
	// Token: 0x0200005B RID: 91
	public class GuidFormatter : IMessagePackFormatter<Guid>
	{
		// Token: 0x0600015B RID: 347 RVA: 0x00005965 File Offset: 0x00003D65
		private GuidFormatter()
		{
		}

		// Token: 0x0600015C RID: 348 RVA: 0x0000596D File Offset: 0x00003D6D
		public int Serialize(ref byte[] bytes, int offset, Guid value, IFormatterResolver formatterResolver)
		{
			return MessagePackBinary.WriteString(ref bytes, offset, value.ToString());
		}

		// Token: 0x0600015D RID: 349 RVA: 0x00005983 File Offset: 0x00003D83
		public Guid Deserialize(byte[] bytes, int offset, IFormatterResolver formatterResolver, out int readSize)
		{
			return new Guid(MessagePackBinary.ReadString(bytes, offset, out readSize));
		}

		// Token: 0x04000050 RID: 80
		public static readonly IMessagePackFormatter<Guid> Instance = new GuidFormatter();
	}
}
